home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / Ioc_SetFlags.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-19  |  1.4 KB  |  53 lines

  1. /* 
  2.  * Ioc_SetFlags.c --
  3.  *
  4.  *    Source code for the Ioc_SetFlags library procedure.
  5.  *
  6.  * Copyright 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  */
  15.  
  16. #ifndef lint
  17. static char rcsid[] = "$Header: Ioc_SetFlags.c,v 1.1 88/06/19 14:29:24 ouster Exp $ SPRITE (Berkeley)";
  18. #endif not lint
  19.  
  20. #include <sprite.h>
  21. #include <fs.h>
  22.  
  23.  
  24. /*
  25.  *----------------------------------------------------------------------
  26.  *
  27.  * Ioc_SetFlags --
  28.  *    Set the flags for the stream.  In this case the flags argument
  29.  *    completely specifies what the stream flags should look like,
  30.  *    ie. it replaces the stream's flags if that is acceptable to
  31.  *    the kernel and the device driver.
  32.  *
  33.  * Results:
  34.  *    None.
  35.  *
  36.  * Side effects:
  37.  *    Set the flags field of the stream.
  38.  *
  39.  *----------------------------------------------------------------------
  40.  */
  41.  
  42. ReturnStatus
  43. Ioc_SetFlags(streamID, flags)
  44.     int streamID;
  45.     int flags;
  46. {
  47.     register ReturnStatus status;
  48.  
  49.     status = Fs_IOControl(streamID, IOC_SET_FLAGS, sizeof(int),
  50.             (Address)&flags, 0, (Address)NULL);
  51.     return(status);
  52. }
  53.